package com.enlorenz.common.geo.analyzer.distance.calc;

import com.copote.adc.paramproc.IStatusModelParamProc;
import com.enlorenz.common.geo.analyzer.distance.IDataCalculator;
import com.enlorenz.core.objectmodel.entity.IStatus;

/**
 * Gps位置不锁星计算
 * @author Karma
 */
public class UnLockNumCalc implements IDataCalculator{
	private IStatusModelParamProc statusModelParamProc;
	public void setStatusModelParamProc(IStatusModelParamProc statusModelParamProc) {
		this.statusModelParamProc = statusModelParamProc;
	}
	public IStatusModelParamProc getStatusModelParamProc() {
		return statusModelParamProc;
	}
	private int totalNum=0;
	@Override
	public void doIterator(int total, int index, IStatus status) {
		if(statusModelParamProc.isGpsUnLock(status)){
			totalNum++;
		}
	}

	@Override
	public String getResult() {
		return String.valueOf(totalNum);
	}
}
